package org.ihelpuoo.weboo.action.http;

import org.ihelpuoo.parser.segment.CharSegment;
import org.ihelpuoo.weboo.WebooUtils;
import org.ihelpuoo.weboo.module.ActionContext;

public class ErrorAction implements Action
{

	public void execute(ActionContext context) throws Exception
	{
		int status = context.properties().getInt("status");
		context.getResponse().setStatus(status);
		String s = context.properties().getStringTrimed("content");
		s = WebooUtils.formatSegment(context,new CharSegment(s)).toString();
		context.getResponse().getWriter().write(s);
	}

}
